const express = require('express');
const area = require('../data/data_area');
const db = require('../db/index');
const Students = require('../models/students');
const router = new express.Router();
router.get('/student/area',(req,res)=>{
    res.send(area);
})

router.post('/student_info',async(req,res)=>{
    console.log(req.body);
    await db;
    const result = Students.create(req.body);
    console.log(result);
    res.send('学生信息提交成功！！');
})
module.exports = router;